Optimal. Leaf size=137 \[ \frac{2 i d (c+d x) \text{Li}_2\left (-i e^{i (a+b x)}\right )}{b^2}-\frac{2 i d (c+d x) \text{Li}_2\left (i e^{i (a+b x)}\right )}{b^2}-\frac{2 d^2 \text{Li}_3\left (-i e^{i (a+b x)}\right )}{b^3}+\frac{2 d^2 \text{Li}_3\left (i e^{i (a+b x)}\right )}{b^3}-\frac{2 i (c+d x)^2 \tan ^{-1}\left (e^{i (a+b x)}\right )}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0920892, antiderivative size = 137, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 4, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used = {4181, 2531, 2282, 6589} \[ \frac{2 i d (c+d x) \text{Li}_2\left (-i e^{i (a+b x)}\right )}{b^2}-\frac{2 i d (c+d x) \text{Li}_2\left (i e^{i (a+b x)}\right )}{b^2}-\frac{2 d^2 \text{Li}_3\left (-i e^{i (a+b x)}\right )}{b^3}+\frac{2 d^2 \text{Li}_3\left (i e^{i (a+b x)}\right )}{b^3}-\frac{2 i (c+d x)^2 \tan ^{-1}\left (e^{i (a+b x)}\right )}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4181
Rule 2531
Rule 2282
Rule 6589
Rubi steps
\begin{align*} \int (c+d x)^2 \sec (a+b x) \, dx &=-\frac{2 i (c+d x)^2 \tan ^{-1}\left (e^{i (a+b x)}\right )}{b}-\frac{(2 d) \int (c+d x) \log \left (1-i e^{i (a+b x)}\right ) \, dx}{b}+\frac{(2 d) \int (c+d x) \log \left (1+i e^{i (a+b x)}\right ) \, dx}{b}\\ &=-\frac{2 i (c+d x)^2 \tan ^{-1}\left (e^{i (a+b x)}\right )}{b}+\frac{2 i d (c+d x) \text{Li}_2\left (-i e^{i (a+b x)}\right )}{b^2}-\frac{2 i d (c+d x) \text{Li}_2\left (i e^{i (a+b x)}\right )}{b^2}-\frac{\left (2 i d^2\right ) \int \text{Li}_2\left (-i e^{i (a+b x)}\right ) \, dx}{b^2}+\frac{\left (2 i d^2\right ) \int \text{Li}_2\left (i e^{i (a+b x)}\right ) \, dx}{b^2}\\ &=-\frac{2 i (c+d x)^2 \tan ^{-1}\left (e^{i (a+b x)}\right )}{b}+\frac{2 i d (c+d x) \text{Li}_2\left (-i e^{i (a+b x)}\right )}{b^2}-\frac{2 i d (c+d x) \text{Li}_2\left (i e^{i (a+b x)}\right )}{b^2}-\frac{\left (2 d^2\right ) \operatorname{Subst}\left (\int \frac{\text{Li}_2(-i x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^3}+\frac{\left (2 d^2\right ) \operatorname{Subst}\left (\int \frac{\text{Li}_2(i x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^3}\\ &=-\frac{2 i (c+d x)^2 \tan ^{-1}\left (e^{i (a+b x)}\right )}{b}+\frac{2 i d (c+d x) \text{Li}_2\left (-i e^{i (a+b x)}\right )}{b^2}-\frac{2 i d (c+d x) \text{Li}_2\left (i e^{i (a+b x)}\right )}{b^2}-\frac{2 d^2 \text{Li}_3\left (-i e^{i (a+b x)}\right )}{b^3}+\frac{2 d^2 \text{Li}_3\left (i e^{i (a+b x)}\right )}{b^3}\\ \end{align*}
Mathematica [A] time = 0.108983, size = 130, normalized size = 0.95 \[ -\frac{2 i \left (b^2 (c+d x)^2 \tan ^{-1}\left (e^{i (a+b x)}\right )-d \left (b (c+d x) \text{Li}_2\left (-i e^{i (a+b x)}\right )+i d \text{Li}_3\left (-i e^{i (a+b x)}\right )\right )+d \left (b (c+d x) \text{Li}_2\left (i e^{i (a+b x)}\right )+i d \text{Li}_3\left (i e^{i (a+b x)}\right )\right )\right )}{b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.366, size = 392, normalized size = 2.9 \begin{align*}{\frac{4\,icda\arctan \left ({{\rm e}^{i \left ( bx+a \right ) }} \right ) }{{b}^{2}}}-{\frac{2\,i{d}^{2}{\it polylog} \left ( 2,i{{\rm e}^{i \left ( bx+a \right ) }} \right ) x}{{b}^{2}}}+{\frac{2\,idc{\it polylog} \left ( 2,-i{{\rm e}^{i \left ( bx+a \right ) }} \right ) }{{b}^{2}}}-{\frac{2\,idc{\it polylog} \left ( 2,i{{\rm e}^{i \left ( bx+a \right ) }} \right ) }{{b}^{2}}}+{\frac{2\,i{d}^{2}{\it polylog} \left ( 2,-i{{\rm e}^{i \left ( bx+a \right ) }} \right ) x}{{b}^{2}}}-{\frac{{d}^{2}\ln \left ( 1+i{{\rm e}^{i \left ( bx+a \right ) }} \right ){x}^{2}}{b}}+2\,{\frac{{d}^{2}{\it polylog} \left ( 3,i{{\rm e}^{i \left ( bx+a \right ) }} \right ) }{{b}^{3}}}-{\frac{2\,i{d}^{2}{a}^{2}\arctan \left ({{\rm e}^{i \left ( bx+a \right ) }} \right ) }{{b}^{3}}}+2\,{\frac{cd\ln \left ( 1-i{{\rm e}^{i \left ( bx+a \right ) }} \right ) x}{b}}-2\,{\frac{cd\ln \left ( 1+i{{\rm e}^{i \left ( bx+a \right ) }} \right ) x}{b}}+{\frac{{d}^{2}\ln \left ( 1-i{{\rm e}^{i \left ( bx+a \right ) }} \right ){x}^{2}}{b}}-{\frac{{a}^{2}{d}^{2}\ln \left ( 1-i{{\rm e}^{i \left ( bx+a \right ) }} \right ) }{{b}^{3}}}+{\frac{{a}^{2}{d}^{2}\ln \left ( 1+i{{\rm e}^{i \left ( bx+a \right ) }} \right ) }{{b}^{3}}}-2\,{\frac{cd\ln \left ( 1+i{{\rm e}^{i \left ( bx+a \right ) }} \right ) a}{{b}^{2}}}-{\frac{2\,i{c}^{2}\arctan \left ({{\rm e}^{i \left ( bx+a \right ) }} \right ) }{b}}-2\,{\frac{{d}^{2}{\it polylog} \left ( 3,-i{{\rm e}^{i \left ( bx+a \right ) }} \right ) }{{b}^{3}}}+2\,{\frac{cd\ln \left ( 1-i{{\rm e}^{i \left ( bx+a \right ) }} \right ) a}{{b}^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.85081, size = 535, normalized size = 3.91 \begin{align*} \frac{2 \, c^{2} \log \left (\sec \left (b x + a\right ) + \tan \left (b x + a\right )\right ) - \frac{4 \, a c d \log \left (\sec \left (b x + a\right ) + \tan \left (b x + a\right )\right )}{b} + \frac{2 \, a^{2} d^{2} \log \left (\sec \left (b x + a\right ) + \tan \left (b x + a\right )\right )}{b^{2}} + \frac{4 \, d^{2}{\rm Li}_{3}(i \, e^{\left (i \, b x + i \, a\right )}) - 4 \, d^{2}{\rm Li}_{3}(-i \, e^{\left (i \, b x + i \, a\right )}) +{\left (-2 i \,{\left (b x + a\right )}^{2} d^{2} +{\left (-4 i \, b c d + 4 i \, a d^{2}\right )}{\left (b x + a\right )}\right )} \arctan \left (\cos \left (b x + a\right ), \sin \left (b x + a\right ) + 1\right ) +{\left (-2 i \,{\left (b x + a\right )}^{2} d^{2} +{\left (-4 i \, b c d + 4 i \, a d^{2}\right )}{\left (b x + a\right )}\right )} \arctan \left (\cos \left (b x + a\right ), -\sin \left (b x + a\right ) + 1\right ) +{\left (-4 i \, b c d - 4 i \,{\left (b x + a\right )} d^{2} + 4 i \, a d^{2}\right )}{\rm Li}_2\left (i \, e^{\left (i \, b x + i \, a\right )}\right ) +{\left (4 i \, b c d + 4 i \,{\left (b x + a\right )} d^{2} - 4 i \, a d^{2}\right )}{\rm Li}_2\left (-i \, e^{\left (i \, b x + i \, a\right )}\right ) +{\left ({\left (b x + a\right )}^{2} d^{2} + 2 \,{\left (b c d - a d^{2}\right )}{\left (b x + a\right )}\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} + 2 \, \sin \left (b x + a\right ) + 1\right ) -{\left ({\left (b x + a\right )}^{2} d^{2} + 2 \,{\left (b c d - a d^{2}\right )}{\left (b x + a\right )}\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} - 2 \, \sin \left (b x + a\right ) + 1\right )}{b^{2}}}{2 \, b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] time = 1.70654, size = 1534, normalized size = 11.2 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (c + d x\right )^{2} \sec{\left (a + b x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (d x + c\right )}^{2} \sec \left (b x + a\right )\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]